﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="MenuDetail.aspx.cs" Inherits="MenuDetail" Title="Untitled Page" %>

<%@ Register Assembly="CuteEditor" Namespace="CuteEditor" TagPrefix="CE" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script src="JsHome/CheInput.js" type="text/javascript"></script>
<div>
<div id="body_all">
<div id="divtable">
<table class="font12 gray line_height30"  cellSpacing="1" cellPadding="0" width="700" align="center" border="0">
  <tbody>
    <tr>
        <td align="right" style="width: 69px">
            语言：</td>
        <td align="left"  style="width:400px"> 
            <asp:DropDownList ID="ddl_Language" runat="server" AutoPostBack="True" DataSourceID="ods_Language"
                DataTextField="Name" DataValueField="Id" OnSelectedIndexChanged="ddl_Language_SelectedIndexChanged">
            </asp:DropDownList><asp:ObjectDataSource ID="ods_Language" runat="server" SelectMethod="GetLanguages"
                TypeName="BLL.LanguageManager"></asp:ObjectDataSource>
        </td>
    </tr>
   
    <tr>
        <td align="right" style="width: 69px">
            名称：</td>
        <td align="left"  style="width:400px"> 
            <asp:TextBox ID="tb_Name" runat="server" ></asp:TextBox></td>
    </tr>    
    <tr>
        <td align="right" style="width: 69px">
            单位：</td>
        <td align="left"  style="width:400px"> 
            <asp:TextBox ID="tb_Unit" runat="server"></asp:TextBox></td>
    </tr>    
    <tr>
        <td align="right" style="width: 69px">
            代码：</td>
        <td align="left"  style="width:400px"> 
            <asp:TextBox ID="tb_Code" runat="server"></asp:TextBox></td>
    </tr>    
    <tr>
        <td align="right" style="width: 69px">
            价格：</td>
        <td align="left"  style="width:400px"> 
            <asp:TextBox ID="tb_Price" runat="server"></asp:TextBox></td>
    </tr>
    <tr>
        <td align="right" style="width: 69px">
            分类：</td>
        <td align="left"  style="width:400px"> 
            <asp:DropDownList ID="ddl_Type" runat="server" DataSourceID="ods" DataTextField="Name" DataValueField="Id">
            </asp:DropDownList><asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetTypes"
                TypeName="BLL.TypeManager">
                <SelectParameters>
                    <asp:ControlParameter ControlID="ddl_Language" DefaultValue="0" Name="language" PropertyName="SelectedValue"
                        Type="Int32" />
                </SelectParameters>
            </asp:ObjectDataSource>
        </td>
    </tr>
    <tr>
        <td align="right" style="width: 69px">
            评价：</td>
        <td align="left"  style="width:400px"> 
            <CE:Editor ID="e_Trait" runat="server">
                <FrameStyle BackColor="White" BorderColor="#DDDDDD" BorderStyle="Solid" BorderWidth="1px"
                    CssClass="CuteEditorFrame" Height="100%" Width="100%" />
            </CE:Editor>
        </td>
    </tr>
    <tr>
        <td align="right" style="width: 69px">
            </td>
        <td align="left"  style="width:400px"> 
            <asp:Button ID="btn_New" runat="server" OnClick="btn_New_Click" Text="新建" OnClientClick="return Check()" />
            <asp:Button ID="btn_Update" runat="server" OnClick="btn_Update_Click" Text="修改"  OnClientClick="return Check()"/></td>
    </tr>
</tbody>
 </table>
 </div>
 </div>
 </div>
 <script type="text/javascript">
 function Check()
 {
    //alert(CheckInput("","名称","",2,50));
    if(!CheckInput(document.getElementById("<%= tb_Name.ClientID%>").value,"名称","",2,50))return false;
    if(!CheckInput(document.getElementById("<%= tb_Price.ClientID%>").value,"价格","MONEY",2,50))return false;
    //if(!CheckInput(document.getElementById("<%= tb_Name.ClientID%>").value,"名称","",2,50))return false;
    return ;
    
 }
 </script>
</asp:Content>

